package com.phenix.network.interceptor

import com.phenix.network.environment.INetworkRequired
import okhttp3.Interceptor
import okhttp3.Response

class RequestInterceptor(private val requiredInfo: INetworkRequired) : Interceptor{

    override fun intercept(chain: Interceptor.Chain): Response {
        return chain.proceed(chain.request().newBuilder()
            .addHeader("os", "android")
            .addHeader("appVersion", requiredInfo.getAppVersionName())
            .build()
        )
    }
}